Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lang] Migrate irpass::scalarize() after irpass::lower_access() #8091

Merged
merged 9 commits into from
May 30, 2023

Conversation

jim19930609
Copy link
Contributor

@jim19930609 jim19930609 commented May 29, 2023

Issue: #

Brief Summary

🤖 Generated by Copilot at d754141

Refactored and improved the scalarize IR pass and applied it selectively to block-local storage (BLS) kernels. This enhances the performance and correctness of the BLS transformation and simplifies the compilation pipeline.

Walkthrough

🤖 Generated by Copilot at d754141

  • Change the scalarize function to return a bool value indicating if the IR was modified (link, link)
  • Move the scalarize function to a later stage in the compilation pipeline, after the offloading is done, and only apply it to offloaded kernels with BLS enabled (link, link)
  • Check the return value of the scalarize function and call full_simplify or die only if the IR was modified (link, link)
  • Add a helper function make_pass_printer to print the IR after each pass if the verbose flag is true (link)
  • Call scalarize and full_simplify in the make_block_local_offload function to handle the case where the global pointer index is a tensor type stored in an alloca statement (link)
  • Use the delayed_modifier_ as a return value of the run function for each IR pass class in scalarize.cpp, and avoid calling the modifier twice (link, link, link, link, link, link)
  • Change the run function of the MergeExternalAndMatrixPtr class to return a bool value and make it consistent with other IR passes (link)

@netlify
Copy link

netlify bot commented May 29, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 99130d0
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/647452b69288c800086da0c9

@jim19930609
Copy link
Contributor Author

/rebase

@taichi-gardener
Copy link
Contributor

Rebase failed, please resolve the conflicts manually.

Copy link
Contributor

@dream189free dream189free left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jim19930609 jim19930609 merged commit afbc85b into taichi-dev:master May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants